<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

use App\Repositories\Eloquent\Mgt\ActivityRepository as Activity;

class DefaultController extends Controller
{

    protected $activity;

    public function __construct(Activity $activity)
    {
        parent::__construct();

        $this->activity = $activity;
    }

    public function index()
    {
        $activities = $this->activity->activities();

        return view($this->view, ['acts'=>$activities] );
    }


    public function logout()
    {
        \Auth::guard('admin')->logout();

        return redirect()->intended('/login');
    }

    public function download()
    {
        return view($this->view);
    }
}